import { createStore, applyMiddleware, combineReducers } from 'redux'
import counterReducer from './reducers/counter_reducer'
import personReducer from './reducers/person_reducer'
import thunk from 'redux-thunk'

const allReducer = combineReducers({
    counter: counterReducer,
    person: personReducer
})

// 创建 Store 对象，reducer 为入参
export default createStore(allReducer, applyMiddleware(thunk))